#include <stdio.h>
#include <string.h>

int calculation(char *arr)
{
    int length = strlen(arr);
    int num = 0;
    for (int i = 0; i < length; i++)
    {
        if (arr[i] >= '1' && arr[i] <= '9')
        {
            num += arr[i]-'0';  //减去'0'转成整数
        }
    }
    return num;
}

int main()
{
    char arr[100] = " ";
    scanf("%s", arr);
    int str = calculation(arr);
    printf("%d\n", str);
    return 0;
}